function out = my_getSignalWeight(Map,Mask)
	% Table = my_getSignalWeight(Map,Mask)
	% ----------------------------------
	% Description:
	% 	return table of signal area weight of value in Map
	% 	omitnan
	% Input:
	% 	Map, 2D matrix, NaN support
	% 	Mask, option, if set, count area weight only in Mask
	% Table:
	% 	Ta | area weight | value sum | value weight
	% 	--------------------------------------------
	% 	negetive value|    |		|				|
	% 	zero		|		|		|				|
	% 	positive value|    |         |              |
	% 	total		|		|		|				|

	arguments
		Map double
		Mask = []
	end

	% pre set, if mask is set
	if ~isempty(Mask)
		if ~all(size(Mask) == size(Map))
			error('Size of Mask must be same to Map');
		else
			Map = my_setNaN(Map,Mask,'NaNTag',NaN);
		end
	end

	out = table('Size',[4,3],...
		'VariableTypes',{'double','double','double'},...
		'VariableNames',{'area weight','value sum','value weight'},...
		'RowNames',{'nega','zero','posi','total'});
	Signal = sign(Map);

	if ~isempty(Mask)
		Total.Area = sum(Mask,'all');
	else
		Total.Area = sum(~isnan(Map),'all');
	end

	Total.Value = sum(Map,'all','omitnan');
	for ii = [-1,0,1]
		LinearIndex = Signal == ii;
		out{ii+2,1} = sum(LinearIndex,'all') ./ Total.Area;
		out{ii+2,2} = sum(Map(LinearIndex));
		out{ii+2,3} = out{ii+2,2} ./ Total.Value;
	end

	out{4,1} = sum(out{1:3,1});
	out{4,2} = sum(out{1:3,2});
	out{4,3} = sum(out{1:3,3});
end
